3.3.87 \(\int \frac {\text {ArcTan}(a x)^2}{x (c+a^2 c x^2)} \, dx\) [287]

Optimal. Leaf size=91 \[ -\frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {PolyLog}\left (3,-1+\frac {2}{1-i a x}\right )}{2 c} \]

[Out]

-1/3*I*arctan(a*x)^3/c+arctan(a*x)^2*ln(2-2/(1-I*a*x))/c-I*arctan(a*x)*polylog(2,-1+2/(1-I*a*x))/c+1/2*polylog
(3,-1+2/(1-I*a*x))/c

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {5044, 4988, 5004, 5112, 6745} \begin {gather*} -\frac {i \text {ArcTan}(a x) \text {Li}_2\left (\frac {2}{1-i a x}-1\right )}{c}-\frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (\frac {2}{1-i a x}-1\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcTan[a*x]^2/(x*(c + a^2*c*x^2)),x]

[Out]

((-1/3*I)*ArcTan[a*x]^3)/c + (ArcTan[a*x]^2*Log[2 - 2/(1 - I*a*x)])/c - (I*ArcTan[a*x]*PolyLog[2, -1 + 2/(1 -
I*a*x)])/c + PolyLog[3, -1 + 2/(1 - I*a*x)]/(2*c)

Rule 4988

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Simp[(a + b*ArcTan[c*x])
^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Dist[b*c*(p/d), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))
]/(1 + c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5044

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), x_Symbol] :> Simp[(-I)*((a + b*ArcT
an[c*x])^(p + 1)/(b*d*(p + 1))), x] + Dist[I/d, Int[(a + b*ArcTan[c*x])^p/(x*(I + c*x)), x], x] /; FreeQ[{a, b
, c, d, e}, x] && EqQ[e, c^2*d] && GtQ[p, 0]

Rule 5112

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[I*(a + b*ArcTa
n[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] - Dist[b*p*(I/2), Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 - u]
/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - 2*(I
/(I + c*x)))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps

\begin {align*} \int \frac {\tan ^{-1}(a x)^2}{x \left (c+a^2 c x^2\right )} \, dx &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {i \int \frac {\tan ^{-1}(a x)^2}{x (i+a x)} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {(2 a) \int \frac {\tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {(i a) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (-1+\frac {2}{1-i a x}\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(243\) vs. \(2(91)=182\).
time = 0.03, size = 243, normalized size = 2.67 \begin {gather*} \frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {2 \text {ArcTan}(a x)^2 \tanh ^{-1}\left (1-\frac {2 i}{i-a x}\right )}{c}+\frac {\text {ArcTan}(a x)^2 \log \left (\frac {2 i}{i-a x}\right )}{c}+\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,\frac {-i-a x}{-i+a x}\right )}{c}+\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,-\frac {i+a x}{i-a x}\right )}{c}-\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,\frac {i+a x}{-i+a x}\right )}{c}+\frac {\text {PolyLog}\left (3,\frac {-i-a x}{-i+a x}\right )}{2 c}+\frac {\text {PolyLog}\left (3,-\frac {i+a x}{i-a x}\right )}{2 c}-\frac {\text {PolyLog}\left (3,\frac {i+a x}{-i+a x}\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcTan[a*x]^2/(x*(c + a^2*c*x^2)),x]

[Out]

((I/3)*ArcTan[a*x]^3)/c + (2*ArcTan[a*x]^2*ArcTanh[1 - (2*I)/(I - a*x)])/c + (ArcTan[a*x]^2*Log[(2*I)/(I - a*x
)])/c + (I*ArcTan[a*x]*PolyLog[2, (-I - a*x)/(-I + a*x)])/c + (I*ArcTan[a*x]*PolyLog[2, -((I + a*x)/(I - a*x))
])/c - (I*ArcTan[a*x]*PolyLog[2, (I + a*x)/(-I + a*x)])/c + PolyLog[3, (-I - a*x)/(-I + a*x)]/(2*c) + PolyLog[
3, -((I + a*x)/(I - a*x))]/(2*c) - PolyLog[3, (I + a*x)/(-I + a*x)]/(2*c)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 1.26, size = 1689, normalized size = 18.56

method result size
derivativedivides \(\text {Expression too large to display}\) \(1689\)
default \(\text {Expression too large to display}\) \(1689\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(a*x)^2/x/(a^2*c*x^2+c),x,method=_RETURNVERBOSE)

[Out]

-1/2/c*arctan(a*x)^2*ln(a^2*x^2+1)+1/c*arctan(a*x)^2*ln(a*x)-1/c*(1/4*I*arctan(a*x)^2*Pi*csgn(I/((1+I*a*x)^2/(
a^2*x^2+1)+1)^2)*csgn(I*(1+I*a*x)^2/(a^2*x^2+1))*csgn(I*(1+I*a*x)^2/(a^2*x^2+1)/((1+I*a*x)^2/(a^2*x^2+1)+1)^2)
-1/2*I*Pi*csgn(I*((1+I*a*x)^2/(a^2*x^2+1)-1))*csgn(I/((1+I*a*x)^2/(a^2*x^2+1)+1))*csgn(I*((1+I*a*x)^2/(a^2*x^2
+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)+1))*arctan(a*x)^2-arctan(a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2+1)^(1/2))*csgn(I*(1+I*a*x)^2/(a^2*x^2+1))^2-1/4*I*ar
ctan(a*x)^2*Pi*csgn(I*(1+I*a*x)^2/(a^2*x^2+1))*csgn(I*(1+I*a*x)^2/(a^2*x^2+1)/((1+I*a*x)^2/(a^2*x^2+1)+1)^2)^2
-2*polylog(3,(1+I*a*x)/(a^2*x^2+1)^(1/2))+1/2*I*Pi*csgn(I*((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)
+1))*csgn(((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)+1))^2*arctan(a*x)^2+1/2*I*Pi*csgn(I*((1+I*a*x)^
2/(a^2*x^2+1)-1))*csgn(I*((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)+1))^2*arctan(a*x)^2-1/2*I*Pi*csg
n(I*((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)+1))*csgn(((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^
2*x^2+1)+1))*arctan(a*x)^2+1/2*I*Pi*csgn(I/((1+I*a*x)^2/(a^2*x^2+1)+1))*csgn(I*((1+I*a*x)^2/(a^2*x^2+1)-1)/((1
+I*a*x)^2/(a^2*x^2+1)+1))^2*arctan(a*x)^2-1/2*I*Pi*csgn(I*((1+I*a*x)^2/(a^2*x^2+1)-1)/((1+I*a*x)^2/(a^2*x^2+1)
+1))^3*arctan(a*x)^2+arctan(a*x)^2*ln((1+I*a*x)^2/(a^2*x^2+1)-1)-arctan(a*x)^2*ln(1-(1+I*a*x)/(a^2*x^2+1)^(1/2
))-arctan(a*x)^2*ln(1+(1+I*a*x)/(a^2*x^2+1)^(1/2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/x/(a^2*c*x^2+c),x, algorithm="maxima")

[Out]

integrate(arctan(a*x)^2/((a^2*c*x^2 + c)*x), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/x/(a^2*c*x^2+c),x, algorithm="fricas")

[Out]

integral(arctan(a*x)^2/(a^2*c*x^3 + c*x), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\operatorname {atan}^{2}{\left (a x \right )}}{a^{2} x^{3} + x}\, dx}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(a*x)**2/x/(a**2*c*x**2+c),x)

[Out]

Integral(atan(a*x)**2/(a**2*x**3 + x), x)/c

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/x/(a^2*c*x^2+c),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atan}\left (a\,x\right )}^2}{x\,\left (c\,a^2\,x^2+c\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atan(a*x)^2/(x*(c + a^2*c*x^2)),x)

[Out]

int(atan(a*x)^2/(x*(c + a^2*c*x^2)), x)

________________________________________________________________________________________